home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / P / PerpetCalendar.cpt / Calendar / background_2707.txt < prev    next >
Encoding:
Text File  |  1989-10-16  |  6.6 KB  |  268 lines

  1. -- background: 2707 from stack: in
  2. -- bmap block id: 11741
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: 
  6.  
  7.  
  8. -- part 22 (field)
  9. -- low flags: 80
  10. -- high flags: 0002
  11. -- rect: left=67 top=303 right=321 bottom=354
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: launch
  20.  
  21.  
  22. -- part 1 (field)
  23. -- low flags: 01
  24. -- high flags: 0000
  25. -- rect: left=48 top=106 right=235 bottom=314
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 21
  30. -- text size: 18
  31. -- style flags: 0
  32. -- line height: 20
  33. -- part name: days
  34.  
  35.  
  36. -- part 2 (field)
  37. -- low flags: 01
  38. -- high flags: 0002
  39. -- rect: left=46 top=77 right=97 bottom=313
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 0
  43. -- font id: 3
  44. -- text size: 14
  45. -- style flags: 256
  46. -- line height: 18
  47. -- part name: 
  48.  
  49.  
  50. -- part 4 (field)
  51. -- low flags: 01
  52. -- high flags: 0002
  53. -- rect: left=83 top=254 right=274 bottom=201
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 0
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: month
  62.  
  63.  
  64. -- part 5 (field)
  65. -- low flags: 01
  66. -- high flags: 0002
  67. -- rect: left=206 top=254 right=274 bottom=270
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: year
  76.  
  77.  
  78. -- part 8 (button)
  79. -- low flags: 00
  80. -- high flags: 0004
  81. -- rect: left=366 top=257 right=291 bottom=405
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 20098 / 20098
  84. -- text alignment: 1
  85. -- font id: 0
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: Home
  90. ----- HyperTalk script -----
  91. on mouseUp
  92.   visual effect iris close
  93.   go "Home"
  94. end mouseUp
  95.  
  96.  
  97.  
  98. -- part 17 (field)
  99. -- low flags: 00
  100. -- high flags: 0002
  101. -- rect: left=328 top=104 right=119 bottom=407
  102. -- title width / last selected line: 0
  103. -- icon id / first selected line: 0 / 0
  104. -- text alignment: 0
  105. -- font id: 3
  106. -- text size: 9
  107. -- style flags: 0
  108. -- line height: 12
  109. -- part name: spclhedr
  110.  
  111.  
  112. -- part 18 (field)
  113. -- low flags: 00
  114. -- high flags: 0002
  115. -- rect: left=423 top=104 right=118 bottom=483
  116. -- title width / last selected line: 0
  117. -- icon id / first selected line: 0 / 0
  118. -- text alignment: 0
  119. -- font id: 3
  120. -- text size: 9
  121. -- style flags: 0
  122. -- line height: 12
  123. -- part name: bday
  124.  
  125.  
  126. -- part 19 (field)
  127. -- low flags: 80
  128. -- high flags: 0002
  129. -- rect: left=442 top=104 right=118 bottom=483
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 0 / 0
  132. -- text alignment: 0
  133. -- font id: 3
  134. -- text size: 9
  135. -- style flags: 0
  136. -- line height: 12
  137. -- part name: evnt
  138.  
  139.  
  140. -- part 9 (field)
  141. -- low flags: 00
  142. -- high flags: 0007
  143. -- rect: left=328 top=115 right=166 bottom=499
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 0 / 0
  146. -- text alignment: 0
  147. -- font id: 3
  148. -- text size: 9
  149. -- style flags: 0
  150. -- line height: 12
  151. -- part name: specials
  152.  
  153.  
  154. -- part 14 (field)
  155. -- low flags: 80
  156. -- high flags: 0000
  157. -- rect: left=84 top=307 right=324 bottom=387
  158. -- title width / last selected line: 0
  159. -- icon id / first selected line: 0 / 0
  160. -- text alignment: 0
  161. -- font id: 3
  162. -- text size: 10
  163. -- style flags: 0
  164. -- line height: 13
  165. -- part name: launch
  166.  
  167.  
  168. -- part 24 (button)
  169. -- low flags: 00
  170. -- high flags: 0004
  171. -- rect: left=280 top=250 right=279 bottom=315
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 15972 / 15972
  174. -- text alignment: 1
  175. -- font id: 0
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: Dates
  180. ----- HyperTalk script -----
  181. on mouseUp
  182.   global cdholder
  183.   put cdholder into oldcard
  184.   -- The following ask boxes put the current month and year in them
  185.   ask "Please enter month:" with word 2 of the long date
  186.   put it into monthName
  187.   if it is empty then exit mouseUp
  188.   ask "Please enter the year:" with word 4 of the long date
  189.   put it into yearName
  190.   if it is empty then exit mouseUp
  191.   repeat while it < 1821 or it > 2100
  192.     ask "The year must be 1821 through 2100..." with yearName
  193.     put it into yearName
  194.   end repeat
  195.   repeat  -- Verifies a correct month name has been entered
  196.     if monthName <> "January" then
  197.       if monthName <> "February" then
  198.         if monthName <> "March" then
  199.           if monthName <> "April" then
  200.             if monthName <> "May" then
  201.               if monthName <> "June" then
  202.                 if monthName <> "July" then
  203.                   if monthName <> "August" then
  204.                     if monthName <> "September" then
  205.                       if monthName <> "October" then
  206.                         if monthName <> "November" then
  207.                           if monthName <> "December" then
  208.                             -- Obviously an incorrest month name
  209.                             ask "Please check name of month..." with monthName
  210.                             put it into monthName
  211.                             next repeat  --Loops again to verify
  212.                           end if
  213.                         end if
  214.                       end if
  215.                     end if
  216.                   end if
  217.                 end if
  218.               end if
  219.             end if
  220.           end if
  221.         end if
  222.       end if
  223.     end if
  224.     exit repeat
  225.   end repeat
  226.   lock screen
  227.   go to card monthName of stack calendar
  228.   repeat with theLine = 1 to 7  --Each line is a day of the week
  229.     if yearName is in line theLine of card field monthName then
  230.       put theLine into Count
  231.       exit repeat
  232.     end if
  233.   end repeat
  234.   if Count = 1 then go to card Sunday
  235.   if Count = 2 then go to card Monday
  236.   if Count = 3 then go to card Tuesday
  237.   if Count = 4 then go to card Wednesday
  238.   if Count = 5 then go to card Thursday
  239.   if Count = 6 then go to card Friday
  240.   if Count = 7 then go to card Saturday
  241.   put the short name of this card into cdholder
  242.   put field days into dayHold
  243.   go to card display  --The card you will see
  244.   put dayHold into field days
  245.   put monthName into field month
  246.   put yearName into field year
  247.   hide field specials
  248.   hide field spclhedr
  249.   hide field bday
  250.   hide field evnt
  251.   --The next 2 ifs check for months with less than 31 days
  252.   if (monthName = "February") or (monthName = "April") or (monthName = "June") or (monthName = "September") or (monthName = "November") then
  253.     delete word "31" of field days
  254.   end if
  255.   if monthName = "February" then
  256.     delete word "30" of field days
  257.     if yearName mod 4 <> 0 or yearName = 1900 then
  258.       delete word "29" of field days
  259.     end if
  260.   end if
  261.   push card
  262.   go cd oldcard
  263.   unlock screen
  264.   visual dissolve slow
  265.   pop card
  266. end mouseUp
  267.  
  268.